<style>
.fui-list-inner .row .row-text{font-size:0.7rem}
</style>
<div ng-if="pagedata.op!='fa'" class='fui-page fui-page-current'>
    <div class="fui-header">
        <div class="fui-header-left">
            <a class="back" ng-click="goback();"></a>
        </div>
        <div class="title">订单管理</div>
    </div>
    <!-- 顶部tab -->
    <div id="tab" class="fui-tab fui-tab-danger" style="margin-top:2.3rem">
			<a ng-class="{'active':pagedata.params.status==1}" ng-click="pagedata.params.status=1;tool.get_list('jy_qiuyuyue/manage.order/getlist/',true);">待处理</a>
            <a ng-class="{'active':pagedata.params.status==0}" ng-click="pagedata.params.status=0;tool.get_list('jy_qiuyuyue/manage.order/getlist/',true);" >待付款</a>
            <a ng-class="{'active':pagedata.params.status==2}" ng-click="pagedata.params.status=2;tool.get_list('jy_qiuyuyue/manage.order/getlist/',true);">已处理</a>
            <a ng-class="{'active':pagedata.params.status==3}" ng-click="pagedata.params.status=3;tool.get_list('jy_qiuyuyue/manage.order/getlist/',true);">已完成</a>
            <a ng-class="{'active':pagedata.params.status==4}" ng-click="pagedata.params.status=4;tool.get_list('jy_qiuyuyue/manage.order/getlist/',true);">已关闭</a>
    </div>
    <div class='fui-content' style="margin-top:0.5rem">
        <!-- 订单列表 -->
        <div ng-repeat="item in pagedata.list" class="fui-list-group" style="padding-bottom:0.5rem">
            <a class="fui-list order-list title-b" ng-click="access_json('jy_qiuyuyue/manage.order_detail//id='+item.id)"  data-nocache="true">
                <div class="fui-list-inner">
                    <div class="row">
                        <div class="row-text" style="font-size: 0.7rem; color: #666">{{item.ordersn}}</div>
                    </div>
                    <div class="row gary">
                        <div class="row-text">{{item.createtime}}</div>
                    </div>
                </div>
                <div class="angle"></div>
            </a>
			<a href="javascript:;" class="external" data-nocache="true" ng-click="access_json('jy_qiuyuyue/manage.order_detail//id='+item.id)">
							<div class="fui-list goods-list" style="background:none">
								<div class="fui-list-media" style="">
									<img class="" ng-src="{{tomedia(item.serve.image) || '../core/resource/images/nopic.jpg'}}">
								</div>
								<div class="fui-list-inner">
									<div class="text goodstitle towline">{{item.serve.title}}</div>
									<div class="text" style="color:#f60;font-size:">场地:{{item.plate.title || '默认场地'}}</div>
									<div class="text">
									<div ng-repeat="row in item.serve_times" class="jy-2">
										<div class="yuyue-duan" style="width:auto;background:#f60;color:#fff;border: 1px solid #f60;">
											<div>{{item.day}} {{row.times.start}}--{{row.times.end}}</div>
											<div>(￥{{price(row.fee)}}) <span class="bold"> {{item.is_ban==1?'半场'+row.id:'全场'}}</span></div>
											<div class="clear"></div>
										</div>
									</div>
									</div>
								</div>
								<div class="fui-list-angle" style="width:3rem">
									￥<span class="marketprice">{{item.money}}</span></div>
							</div>
			</a> 
            <div class="fui-list log-list noclick">
                <div class="fui-list-inner">
                    <div class="row log-row order">
                        <div class="row-text">订单状态</div>
                        <div class="row-remark"><span class="text-danger">{{pagedata.status[item.status]}}</span></div>
                    </div>
                    <div class="row log-row order">
                        <div class="row-text">预定人</div>
                        <div class="row-remark">{{item.username}}</div>
                    </div>
                    <div class="row log-row order">
                        <div class="row-text">联系电话</div>
                        <div class="row-remark"><span class="text-success">{{item.mobile}}</span></div>
                    </div>
                 
                        <div ng-if="item.remark" class="row log-row order">
                            <div class="row-text">客户留言</div>
                            <div class="row-remark">{{item.remark}}</div>
                        </div>
                  
                </div>
            </div>

            <div class="fui-list-group-title text-right">
                <small class="status">实付:<span class="text-success">￥{{item.money}}</span> </small>
            </div>
			<div ng-if="item.address" class="fui-list-group-title lineblock" style="line-height:1rem;padding:0 0.5rem">
				<span style="line-height:1.3;color:#999;font-size:0.65rem"><i class="icon icon-ditu"></i> 配送： <span class="text-danger">{{item.address}}</span></span>
			</div>
            <div class="fui-list-group-title text-right big">
				<a ng-if="item.status==0" ng-click="modal_json({'action':'jy_qiuyuyue/manage.order/upprice/id='+item.id})"  class="btn btn-sm btn-red order-btn">修改价格</a>
                <a class="btn btn-default btn-sm" ng-click="access_json('jy_qiuyuyue/manage.order_detail//id='+item.id)">查看详情</a>
            </div>
        </div>
       <div class="content-empty" ng-show="pagedata.list.length == 0 ">
		  <i class="icon jinyunicon icon-cry" style="width: 6rem;margin-bottom: 0.5rem;"></i><br/><p style="color: #999;font-size: .75rem">您暂时没有订单！</p>
	</div>
    </div>
    <div class="head-menu-mask"></div>
</div>
<div ng-include="sys_html('common/pluginnav',true)"></div>
<script type="text/javascript">
//手机软键盘--搜索
$("body").keydown(function() {
    if (event.keyCode == "13") {
        $('#searchsub').click();
    }
});

scope.loading = true;
var page = 1;
var keyword = '';
var op = '';
op = scope.pagedata.op;
scope.tool.get_list('jy_qiuyuyue/manage.order/getlist/',true);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_qiuyuyue/manage.order/getlist/');
}
</script>
